package com.dynamixsoftware.printershare.snmp;

import java.io.ByteArrayOutputStream;

public class SNMPUnknownObject
  extends SNMPObject
{
  private byte[] data;
  protected byte tag = 0;
  
  public SNMPUnknownObject(byte[] paramArrayOfByte)
  {
    this.data = paramArrayOfByte;
  }
  
  protected byte[] getBEREncoding()
  {
    ByteArrayOutputStream localByteArrayOutputStream = new ByteArrayOutputStream();
    byte[] arrayOfByte = SNMPBERCodec.encodeLength(this.data.length);
    localByteArrayOutputStream.write(0);
    localByteArrayOutputStream.write(arrayOfByte, 0, arrayOfByte.length);
    localByteArrayOutputStream.write(this.data, 0, this.data.length);
    return localByteArrayOutputStream.toByteArray();
  }
  
  public Object getValue()
  {
    return this.data;
  }
  
  public void setValue(Object paramObject)
    throws SNMPBadValueException
  {
    if ((paramObject instanceof byte[]))
    {
      this.data = ((byte[])paramObject);
      return;
    }
    throw new SNMPBadValueException(" Unknown Object: bad object supplied to set value ");
  }
  
  public String toString()
  {
    return new String(this.data);
  }
}


/* Location:           C:\Users\Admin\Desktop\Decompiler\JAD\jd-gui-0.3.6.windows\classes_dex2jar.jar
 * Qualified Name:     com.dynamixsoftware.printershare.snmp.SNMPUnknownObject
 * JD-Core Version:    0.7.0.1
 */